package com.luych.toolbox.common.feign.view.base.service;

import com.luych.toolbox.common.feign.FeignView;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.text.SimpleDateFormat;

@ApiModel("任务执行日志")
public class TaskLogView extends FeignView {

    @ApiModelProperty("任务Id")
    private String taskId;
    @ApiModelProperty("执行日志")
    private String log;

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getLog() {
        return log;
    }

    public void setLog(String log) {
        this.log = log;
    }

    public String getOut() {
        SimpleDateFormat format  = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
        return format.format(this.getCreateDate()) + " >>> " + this.getLog();
    }
}
